package icu.yougan.trade.service;

import icu.yougan.trade.entity.ChatMessage;
import org.springframework.security.core.Authentication;

import java.util.List;
/**
 * 实时聊天 服务层
 *
 * @author: Lee
 * @date: 2025-03-27
 */
public interface ChatService {
    void saveMessage(ChatMessage message);

    List<ChatMessage> getConversations(Long userId);

    List<ChatMessage> getPrivateMessages(Long sender, Long receiver);

    List<ChatMessage> getItemMessages(Long itemId);

    void markMessagesAsRead(String sessionKey,Long Id);
    List<ChatMessage> getPrivateConversations(Long userId);
    boolean deleteConversations(List<Long> id, Long senderId, Long receiveId,Long deleteUserId);
}